package entity;

/**
 * @author sheryl.tay.2012, mohameds.2012
 * 
 */

public class Bid {
	private Student student;
	private Section section;
	private double bidAmount;
	private String bidResult;

	public Bid(Student student, Section section, double bidAmount) {
		this.student = student;
		this.section = section;
		this.bidAmount = bidAmount;
	}

	public Bid(Student student, Section section, double bidAmount,
			String bidResult) {
		this(student, section, bidAmount);
		this.bidResult = bidResult;
	}

	public double getBidAmount() {
		return bidAmount;
	}

	public void setBidAmount(double bidAmount) {
		this.bidAmount = bidAmount;
	}

	public Student getStudent() {
		return student;
	}

	public Section getSection() {
		return section;
	}

	public String getBidResult() {
		return bidResult;
	}

	@Override
	public String toString() {
		return "\"user\": \"" + student.getUserId() + "\", \"amount\": "
				+ bidAmount + ", \"code\": \""
				+ section.getCourse().getCourseCode() + "\", \"section\": \""
				+ section.getSectionCode() + "\"";
	}
}
